

use super::model;

/// if !user::authentication::authenticate_user_login(&session) {
///     return axum::response::Html(rust_i18n::t!("user.authentication.not_logged"));
/// }
pub fn authenticate_user_login<T>(session: &axum_session::Session<T>) -> bool
    where
        T: axum_session::DatabasePool + Clone + ::std::fmt::Debug + Sync + Send + 'static,
{
    let option: Option<model::User> = session.get("user");
    if option.is_none() {
        return false;
    }
    true
}

